import {newslist} from "@/api/newsapi.js"
export let mnews ={
    state:{
        obj1:[]
    },
    getters:{},
    mutations:{
        uplist1(state,payload){
            state.obj1=payload
        }
    },
    actions:{
        listact(context){
            newslist().then((ok)=>{
                console.log(ok)
                context.commit("uplist1",ok)
            }).catch((err)=>{
                console.log(err)
            })
        }
    },

}